#include "include/lexanalyze.h"  
#include "include/instruction.h"

int main(int argc, char *argv[])
{
    int opt;
    char *filepath = NULL; 
    char *type=NULL;
    /*
    f=>需要编译的文件
    h=>指令帮助
    v=>版本
    t=>编译类型
    */
    while((opt=getopt(argc,argv,"f:t:hv"))!=-1){
        switch (opt){
            case 'f':
                filepath=optarg;
                break;
            case 't':
                type=optarg;
                break;
            case 'h':
                print_help();
                return 0;
            case 'v':
                print_version("1.0.0");
                return 0;
            default:
                print_warning("Error command, please refer to the following instructions");
                print_help();
                return 0;
        }
    }
    if(filepath==NULL)return 0;
    printf("周大伟_实验1.c\n");
    LexAnalyze *lexAnalyze=LexAnalyze_creat(filepath);
    lexAnalyze->getLexAnalyze(lexAnalyze);
    return 0;
}